﻿using System.ComponentModel;
using System.Xml;
using System.Xml.Serialization;

namespace Bpmn.Xml;

/// <remarks/>
[Serializable]
[XmlType(Namespace = "http://www.omg.org/spec/BPMN/20100524/MODEL", TypeName = "tMultiInstanceLoopCharacteristics")]
[XmlRoot("multiInstanceLoopCharacteristics", Namespace = "http://www.omg.org/spec/BPMN/20100524/MODEL", IsNullable = false)]
public partial class MultiInstanceLoopCharacteristics : LoopCharacteristics
{
    /// <remarks/>
    [XmlElement("loopCardinality")]
    public Expression LoopCardinality { get; set; } = default!;

    /// <remarks/>
    [XmlElement("loopDataInputRef")]
    public XmlQualifiedName LoopDataInputRef { get; set; } = default!;

    /// <remarks/>
    [XmlElement("loopDataOutputRef")]
    public XmlQualifiedName LoopDataOutputRef { get; set; } = default!;

    /// <remarks/>
    [XmlElement("inputDataItem")]
    public DataInput InputDataItem { get; set; } = default!;

    /// <remarks/>
    [XmlElement("outputDataItem")]
    public DataOutput OutputDataItem { get; set; } = default!;

    /// <remarks/>
    [XmlElement("complexBehaviorDefinition")]
    public ComplexBehaviorDefinition[] ComplexBehaviorDefinition { get; set; } = default!;

    /// <remarks/>
    [XmlElement("completionCondition")]
    public Expression CompletionCondition { get; set; } = default!;

    /// <remarks/>
    [XmlAttribute("isSequential")]
    [DefaultValue(false)]
    public bool IsSequential { get; set; } = false;


    /// <remarks/>
    [XmlAttribute("behavior")]
    [DefaultValue(MultiInstanceFlowCondition.All)]
    public MultiInstanceFlowCondition Behavior { get; set; } = MultiInstanceFlowCondition.All;


    /// <remarks/>
    [XmlAttribute("oneBehaviorEventRef")]
    public XmlQualifiedName OneBehaviorEventRef { get; set; } = default!;

    /// <remarks/>
    [XmlAttribute("noneBehaviorEventRef")]
    public XmlQualifiedName NoneBehaviorEventRef { get; set; } = default!;
}
